From 77e6e87e0d1ecc8b36c835b6a49df2023931492b Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 19 Oct 2006 14:59:13 +0000 Subject: [PATCH] Trivial leak test in xcsv fixed. --- xcsv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xcsv.c b/xcsv.c index b6a9d0220..6c246c4c5 100644 --- a/xcsv.c +++ b/xcsv.c @@ -219,7 +219,9 @@ xcsv_parse_style_line(const char *sbuff) /* field delimiters are always bad characters */ if (0 == strcmp(p, "\\w")) { - xstrappend(xcsv_file.badchars, " \n\r"); + char *s = xstrappend(xcsv_file.badchars, " \n\r"); + if (xcsv_file.badchars) xfree(xcsv_file.badchars); + xcsv_file.badchars = s; } else { xcsv_file.badchars = xstrappend(xcsv_file.badchars, p); } -- 2.30.2